package com.neuedu.ylbx.controller;

import com.baomidou.mybatisplus.extension.api.R;
import com.neuedu.ylbx.service.InsuredPersonnelService;
import com.neuedu.ylbx.utils.ResultVo;
import com.neuedu.ylbx.vo.PatientsVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/api/remimbursement")
@Api(tags = "参保人员管理")
@CrossOrigin
public class InsuredPersonnelController {
    @Autowired
    private InsuredPersonnelService insuredPersonnelService;

    @ApiOperation("获取参保人员列表")
    @GetMapping("/participants")
    public ResultVo<List<PatientsVo>> getParticipantsPage () throws Exception {
        return insuredPersonnelService.getParticipantsPage();
    }

    @ApiOperation("获取参保人员详情")
    @GetMapping("/participants/{id}")
    public ResultVo getPatientDetails () throws Exception {
        return insuredPersonnelService.getParticipantsDetail();
    }
}
